package com.dc.system.service;

import com.dc.common.model.BaseModel;
import com.dc.system.model.SysRole;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * @Description: SysRoleService
 * @Author: ChenXueLi
 * @Date: 2018-05-06 18:58
 */
public interface SysRoleService {

    /**
     * 添加一个角色
     * @param sysRole
     * @param baseModel
     * @param request
     * @return
     * @throws Exception
     */
    BaseModel addSysRole(SysRole sysRole, BaseModel baseModel, HttpServletRequest request) throws Exception;

    /**
     * 根据角色id删除一个角色
     * @param sysRole
     * @return
     */
    BaseModel deleteSysRoleById(SysRole sysRole, BaseModel baseModel, HttpServletRequest request) throws Exception;

    /**
     * 根据角色id查询角色
     * @param sysRole
     * @param baseModel
     * @param request
     * @return
     * @throws Exception
     */
    BaseModel getSysRoleById(SysRole sysRole, BaseModel baseModel, HttpServletRequest request) throws Exception;

    /**
     * 修改一个角色的信息
     * @param sysRole
     * @param baseModel
     * @param request
     * @return
     * @throws Exception
     */
    BaseModel updateSysRoleById(SysRole sysRole, BaseModel baseModel, HttpServletRequest request) throws Exception;

    /**
     * 分页查询角色
     * @param pageInfo
     * @param sysRole
     * @param baseModel
     * @param request
     * @return
     * @throws Exception
     */
    BaseModel getSysRoles(PageInfo<?> pageInfo, SysRole sysRole, BaseModel baseModel, HttpServletRequest request) throws Exception;

}
